Adjust Delete insensitivity
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 8 Jun 2006 03:51:21 +0000 (03:51 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 8 Jun 2006 03:51:21 +0000 (03:51 +0000)
ChangeLog
ChangeLog.pre-2-10
gtk/gtkentry.c

index 24cd29846d702c5f33c5338f6beeb8a879893282..0f68b3992bf97b94cdefe10a0604a4db2651b4bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-06-07  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentry.c (popup_targets_received): Make Delete
+       menuitem insensitive if entry is not editable.  (#344232, 
+       Milosz Derezynski)
+
        * gtk/gtkprintoperation.c: Add some docs. 
 
        * gtk/gtk.symbols: Add gtk_print_operation_set_allow_async.
index 24cd29846d702c5f33c5338f6beeb8a879893282..0f68b3992bf97b94cdefe10a0604a4db2651b4bf 100644 (file)
@@ -1,5 +1,9 @@
 2006-06-07  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentry.c (popup_targets_received): Make Delete
+       menuitem insensitive if entry is not editable.  (#344232, 
+       Milosz Derezynski)
+
        * gtk/gtkprintoperation.c: Add some docs. 
 
        * gtk/gtk.symbols: Add gtk_print_operation_set_allow_async.
index be5532a5dd20c18189a2c65d62cf8a2a8246ea45..022c3f4d8468cd916e580edb57161c318bc00dbc 100644 (file)
@@ -4857,7 +4857,7 @@ popup_targets_received (GtkClipboard     *clipboard,
        gtk_widget_destroy (entry->popup_menu);
       
       entry->popup_menu = gtk_menu_new ();
-      
+      b
       gtk_menu_attach_to_widget (GTK_MENU (entry->popup_menu),
                                 GTK_WIDGET (entry),
                                 popup_menu_detach);
@@ -4870,7 +4870,7 @@ popup_targets_received (GtkClipboard     *clipboard,
                            entry->editable && clipboard_contains_text);
       
       menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_DELETE, NULL);
-      gtk_widget_set_sensitive (menuitem, entry->current_pos != entry->selection_bound);
+      gtk_widget_set_sensitive (menuitem, entry->editable && entry->current_pos != entry->selection_bound);
       g_signal_connect_swapped (menuitem, "activate",
                                G_CALLBACK (gtk_entry_delete_cb), entry);
       gtk_widget_show (menuitem);